import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'transform'
})
export class TransformPipe implements PipeTransform {

  transform(value: number | string , transformer: () => any) {
    if (value === undefined || !transformer) return value;
    return transformer.call(this, value);
  }

}